const NODE_ENV = process.env.NODE_ENV

const base_dev = 'http://192.168.100.50:8114'
const base_pro = 'https://gateway.meilianshuke.com'

const VITE_API_URL = NODE_ENV === 'development' ? base_dev : base_pro

// ai
const VITE_API_WSS = 'wss://ainengli.meilianshuke.com'
const VITE_API_AI_HTTP = 'https://ainengli.meilianshuke.com'

export const proxy = [`^/api:${VITE_API_URL}/api`]

export const defineURLS = () => {
  return {
    'process.env.NODE_ENV': JSON.stringify(NODE_ENV),
    'process.env.VITE_API_WSS': JSON.stringify(VITE_API_WSS),
    'process.env.VITE_API_AI_HTTP': JSON.stringify(VITE_API_AI_HTTP),
    'process.env.VITE_API_URL': JSON.stringify(VITE_API_URL)
  }
}
